﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DDNY.WebPortals.Common;
using Google.YouTube;
using Google.GData.Client;
using System.Xml;
using KeywordsBasedMVCPortal.Models;
using Google.GData.YouTube;
using Google.GData.Extensions;
using VideoPortal.Models;
using DailyMotion.DataAccess;

namespace DailyMotion.Controllers
{
    public class HomeController : ApplicationController
    {
        //
        // GET: /Home/


        [OutputCache(Duration = 3600, VaryByParam = "id;page")]
        public ActionResult Index(string id, string page)
        {
            if (page==null)
            {
                page = "1";
            }
            if (id==null)
            {
                id = "music";
            }
            int pageNumber=int.Parse(page);
            DailyMotionVideosPagedResult videos = DMHelper.GetVideosByChannelId(id, pageNumber, 15);

            return View("Index",videos);
        }


    }
}
